home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir26 / epi601_2.zip / FILES07.EXE / TUTOR2.PGM < prev    next >
Text File  |  1994-08-22  |  16KB  |  463 lines

  1. ********************************************************
  2. *                                                      *
  3. *                  TUTOR2.PGM                          *
  4. *                                                      *
  5. ********************************************************
  6.  
  7. set pause=off
  8. cls
  9. echo
  10. echo
  11. echo
  12. echo
  13. echo
  14. echo
  15. echo           This Tutorial continues the instruction in ANALYSIS begun
  16. echo                          in the TUTOR1.PGM program.
  17. echo
  18. echo             It provides an introduction to some of the topics in
  19. echo                       Chapter 11 of the Epi Info manual.
  20. echo
  21. ?Press <Enter> to continue (<F10> to QUIT): ?
  22. cls
  23. echo
  24. echo
  25. echo
  26. echo
  27. echo                   You can learn from this tutorial how to:
  28. echo
  29. echo                       Run DOS commands from ANALYSIS
  30. echo                     BROWSE through or UPDATE data files
  31. echo                   Control the treatment of missing values
  32. echo               Use the SELECT, DEFINE, RECODE, and IF commands
  33. echo                    Manage dates and calculate intervals
  34. echo                          SET formatting options
  35. echo                         Save commands as programs
  36. echo
  37. echo
  38. echo
  39. ?Press <Enter> to continue (<F10> to QUIT): ?
  40. cls
  41. echo
  42. echo
  43. echo
  44. echo
  45. echo               Let's begin by making a copy of the OSWEGO.REC file
  46. echo              so that we can alter it without changing the original.
  47. echo
  48. echo             The DOS command lets you use DOS commands, such as COPY
  49. echo                     or even run other programs like EPED.
  50. echo
  51. echo
  52. echo        Please type:     DOS COPY OSWEGO.REC OSWEGO2.REC
  53. echo
  54. ?EPI> ?
  55. CLS
  56. echo
  57. echo
  58. echo
  59. echo
  60. echo
  61. echo
  62. echo                     Now type:               READ Oswego2
  63. echo
  64. echo
  65. echo            (You can use either upper or lower case for commands.)
  66. echo
  67. echo
  68. ?EPI> ?
  69. CLS
  70. echo
  71. echo
  72. echo
  73. echo
  74. echo
  75. echo                     In the tutorial we will do some analysis of
  76. echo                   cases in the OSWEGO2 file.  To select cases only,
  77. echo
  78. echo
  79. echo                           Type:      SELECT ILL = "Y"
  80. echo
  81. echo       (Be sure it is a capital "Y"; the rest can be upper or lower case.)
  82. ?EPI> ?
  83. CLS
  84. echo
  85. echo
  86. echo
  87. echo               The BROWSE command lets you look at the data file in
  88. echo                 spreadsheet format.  You can move around with the
  89. echo                 arrow keys and see all the data, but, for safety's
  90. echo                          sake, cannot change the values.
  91. echo
  92. echo                    To BROWSE, press the <F4> key or type BROWSE
  93. echo
  94. echo                 When you see the data, move around and verify that
  95. echo                  you can see the whole file.  Try out the prompts
  96. echo                at the bottom.  When you have finished, press <F10>.
  97. echo
  98. ?EPI> ?
  99. ?Press <Enter> to continue (<F10> to QUIT): ?
  100. cls
  101. echo
  102. echo
  103. echo
  104. echo
  105. echo                 UPDATE is just like BROWSE, except that you can change
  106. echo                    the data items.  This is the only command in
  107. echo                     ANALYSIS that actually changes the original
  108. echo                  data file; it is important to make a backup file,
  109. echo                    as we have already done, before using UPDATE.
  110. ?Press <Enter> to continue (<F10> to QUIT): ?
  111. cls
  112. echo
  113. echo               To use UPDATE, simply type UPDATE.  You will see the same
  114. echo                 "spreadsheet" you used in BROWSE, but now changes can
  115. echo               be entered in the space at the top. Your entry will appear
  116. echo                  at the location of the cursor bar in the data area.
  117. echo
  118. echo                Type UPDATE and change the blank values for TIMESUPPER
  119. echo               to 2000, the approximate mean of the others. Times like
  120. echo                 "1930" mean 19 hours and 30 minutes.  Change them to
  121. echo                 1950, since we will later divide by 100 to get times
  122. echo                 in hours.  Do this for both TIMESUPPER and ONSETTIME.
  123. ?EPI> ?
  124. ?Press <Enter> to continue (<F10> to QUIT): ?
  125. cls
  126. echo
  127. echo
  128. echo
  129. echo
  130. echo                      In subsequent operations, we want ANALYSIS to
  131. echo                 exclude missing values from the calculations and tables.
  132. echo                       Normally, they are included, and are treated
  133. echo                       as zeroes.  This can be changed with the SET
  134. echo                                          command.
  135. echo
  136. echo
  137. echo
  138. echo
  139. echo                          Type:       SET IGNORE = ON
  140. ?EPI> ?
  141. echo
  142. cls
  143. echo
  144. echo
  145. echo
  146. echo                     You have probably noticed that TIMESUPPER and
  147. echo                     ONSETTIME are in military time, but that the
  148. echo                      date for TIMESUPPER when the offending meal
  149. echo                      was eaten is not in the data file, since in
  150. echo                                all cases it was 04/18.
  151. echo
  152. echo                      We will now proceed through the several steps
  153. echo                           necessary to calculate an incubation
  154. echo                                  period for each case.
  155. echo
  156. ?Press <Enter> to continue (<F10> to QUIT): ?
  157. cls
  158. echo
  159. echo
  160. echo
  161. echo                    First we will DEFINE a new variable, since we
  162. echo                       need a place to store the result of the
  163. echo                       calculation.  Let's call it INCUBATION,
  164. echo                  since variables can have names of up to 10 letters.
  165. echo                     We will make it a numeric variable with one
  166. echo                     decimal place, since the incubation will be
  167. echo                         in hours, to the nearest half hour.
  168. echo
  169. echo
  170. echo                   Type:                  DEFINE INCUBATION ##.#
  171. echo
  172. ?EPI> ?
  173. ?Press <Enter> to continue (<F10> to QUIT): ?
  174. cls
  175. echo
  176. echo
  177. echo
  178. echo
  179. echo             We would like to convert both ONSETTIME and TIMESUPPER
  180. echo          to an absolute number of hours with a defined starting point
  181. echo           so that we can subtract TIMESUPPER from ONSETTIME to get
  182. echo                              INCUBATION in hours.
  183. echo             Arbitrarily we choose the first instant of 04/18 as the
  184. echo                   reference point at which to start the clock.
  185. echo
  186. ?Press <Enter> to continue (<F10> to QUIT): ?
  187. cls
  188. echo
  189. echo
  190. echo
  191. echo
  192. echo              Since all TIMESUPPERs were on 04/18, we do not need
  193. echo              to adjust the hour of onset if ONSETDATE was 04/18.
  194. echo                 For cases with ONSETDATE on 04/19, we can use
  195. echo               the IF command to adjust ONSETTIME by adding 2400
  196. echo                           hours if ONSETDATE was 04/19.
  197. echo
  198. echo
  199. echo      Type:     IF ONSETDATE = "04/19" THEN ONSETTIME = ONSETTIME + 2400
  200. echo
  201. echo            (Note that values for dates must be in quotation marks.)
  202. ?EPI> ?
  203. ?Press <Enter> to continue (<F10> to QUIT): ?
  204. cls
  205. echo
  206. echo
  207. echo
  208. echo
  209. echo                   Now we are ready to calculate INCUBATION.
  210. echo
  211. echo           Type:     INCUBATION = (ONSETTIME - TIMESUPPER)/100
  212. echo
  213. ?EPI> ?
  214. cls
  215. echo
  216. echo
  217. echo
  218. echo                              To assess the results,
  219. echo
  220. echo              Type:              FREQ INCUBATION
  221. ?EPI> ?
  222. ?Press <Enter> to continue (<F10> to QUIT): ?
  223. cls
  224. echo
  225. echo
  226. echo
  227. echo
  228. echo                        Now type:    BAR INCUBATION
  229. ?EPI> ?
  230. cls
  231. echo
  232. echo
  233. echo
  234. echo
  235. echo           We hope the results are reasonable for a staphylococcal
  236. echo             food poisoning outbreak.  If not, perhaps you typed
  237. echo               one of the commands wrong, but, in any case, you
  238. echo                 have seen how mathematical expressions and IF
  239. echo                         statements work in ANALYSIS.
  240. echo
  241. echo
  242. ?Press <Enter> to continue (<F10> to QUIT): ?
  243. cls
  244. echo
  245. echo
  246. echo
  247. echo
  248. echo                 The next task is to group the AGEs so that they
  249. echo                            can be handled more easily.
  250. echo
  251. echo                       This is a job for the RECODE command.
  252. ?Press <Enter> to continue (<F10> to QUIT): ?
  253. cls
  254. echo
  255. echo
  256. echo                  First we need another variable to receive the
  257. echo                   results; let's call it AGEGROUP.  It will be
  258. echo                   a text or "string" variable since the groups
  259. echo                    will be items like "0 to 20" which are not
  260. echo                                  entirely numeric.
  261. echo
  262. echo                   Type:      DEFINE AGEGROUP __________
  263. echo
  264. echo                (AGEGROUP is followed by 10 underline characters, just
  265. echo                 as though we were creating a questionnaire variable.)
  266. echo
  267. ?EPI> ?
  268. cls
  269. echo
  270. echo
  271. echo                     RECODE always recodes a known variable like
  272. echo                      AGE to a variable (sometimes the same one)
  273. echo                      like AGEGROUP.  Since AGE is numeric, and
  274. echo                         we want new values containing text,
  275. echo                     we had to create the text variable AGEGROUP
  276. echo                                to receive the results.
  277. echo
  278. echo                                          Type:
  279. echo
  280. echo   RECODE AGE to AGEGROUP 0-19="0 to 19" 20-39="20 to 39" 40-59="40 to 59"
  281. echo
  282. echo
  283. ?EPI> ?
  284. cls
  285. echo
  286. echo
  287. echo          The older group didn't fit on the same line, and, since RECODE's
  288. echo           are cumulative, we can include this group in another statement.
  289. echo            In a program file, to be described later, you can type lines
  290. echo               longer than 80 characters or use "\" to continue a line,
  291. echo                                     but, for now:
  292. echo
  293. echo         Type:            RECODE AGE to AGEGROUP 60-HI=">=60"
  294. echo
  295. echo                    ("HI" is an expression for the highest value.)
  296. ?EPI> ?
  297. echo
  298. cls
  299. echo
  300. echo
  301. echo
  302. echo                  To test the hypothesis that INCUBATION and AGEGROUP
  303. echo                       are associated (and that you typed in all the
  304. echo                                    commands correctly),
  305. echo
  306. echo         Type:                  TABLES AGEGROUP INCUBATION
  307. echo
  308. ?EPI> ?
  309. echo
  310. ?Press <Enter> to continue (<F10> to QUIT): ?
  311. cls
  312. echo
  313. echo
  314. echo
  315. echo                Another way to look at a possible association would
  316. echo                  be to make a scatter graph of AGE and INCUBATION
  317. echo                        since both are numeric variables.  A
  318. echo                       least squares regression line will be
  319. echo                     useful here, so we end the command with "/R".
  320. echo
  321. echo                 Type:        SCATTER AGE INCUBATION /R
  322. echo
  323. ?EPI> ?
  324. cls
  325. echo
  326. echo            Dates are complex and should be studied in chapter 11 of the
  327. echo             manual, but we will do a simple subtraction to give the
  328. echo              general idea.  The OSWEGO data set has only two dates,
  329. echo                 04/18 and 04/19, but these will do for practice.
  330. echo
  331. echo                    Let's pretend that we want an incubation
  332. echo                   period in days and that it will be obtained
  333. echo                      from subtracting 04/18 from ONSETDATE.
  334. echo
  335. echo                      Type:  Incubation = ONSETDATE - "04/18"
  336. echo
  337. echo         The result will be in DAYS and the literal value "04/18" must be
  338. echo        in quotation marks since dates are a special form of text variable.
  339. ?EPI> ?
  340. cls
  341. echo
  342. echo
  343. echo
  344. echo              The INCUBATIONS should all be 0 or 1 days, which
  345. echo                   of course, is not very useful here, but
  346. echo                    would be appropriate for diseases with
  347. echo                          longer incubation periods.
  348. echo
  349. echo
  350. echo       Type:               LIST ONSETDATE INCUBATION
  351. ?EPI> ?
  352. echo
  353. ?Press <Enter> to continue (<F10> to QUIT): ?
  354. cls
  355. echo
  356. echo
  357. echo
  358. echo
  359. echo               The SET command allows setting many options that
  360. echo               affect the appearance or the printing of tables.
  361. echo
  362. echo                 Press the <F1> key and choose the section of
  363. echo                the help file that describes the SET commands.
  364. echo                  Read about the possible settings and then
  365. echo                  press escape to continue with the tutorial.
  366. echo
  367. ?Press <Enter> to continue (<F10> to QUIT): ?
  368. cls
  369. echo
  370. echo
  371. echo
  372. echo
  373. echo
  374. echo
  375. echo
  376. echo                       Type:         SET PERCENTS = ON
  377. echo
  378. ?EPI> ?
  379. ?Press <Enter> to continue (<F10> to QUIT): ?
  380. cls
  381. echo
  382. echo
  383. echo
  384. echo
  385. echo
  386. echo             Each cell in the table will now contain percentages.
  387. echo              Those with the right arrow ">" are percentages of
  388. echo                the totals on the right; the others have the
  389. echo                    totals at the bottom for denominators.
  390. echo
  391. echo                       Type:          TABLES AGE SEX
  392. ?EPI> ?
  393. ?Press <Enter> to continue (<F10> to QUIT): ?
  394. cls
  395. echo
  396. echo
  397. echo
  398. echo
  399. echo                SET commands and others can be preserved in
  400. echo                   a program file with the special name
  401. echo                    CONFIG.EPI so that they take effect
  402. echo                     automatically each time ANALYSIS
  403. echo                      is run.  More details are given
  404. echo                           in the Epi Info manual.
  405. echo
  406. ?Press <Enter> to continue (<F10> to QUIT): ?
  407. cls
  408. echo
  409. echo
  410. echo
  411. echo
  412. echo
  413. echo                Our final topic is PROGRAM files.  A program is
  414. echo                 merely a series of Epi Info commands saved in
  415. echo                 a text file.  You can create a program in EPED
  416. echo                  by typing one command on each line and then
  417. echo                saving the file with a name ending in .PGM, such
  418. echo                as OUTBREAK.PGM.  To run the program in ANALYSIS
  419. echo                      you would use the command RUN OUTBREAK.
  420. echo
  421. ?Press <Enter> to continue (<F10> to QUIT): ?
  422. cls
  423. echo
  424. echo
  425. echo
  426. echo               If you have already typed several commands from
  427. echo                the keyboard in ANALYSIS and want to save them
  428. echo                 in a program file, the SAVE command will put
  429. echo               up to 20 previous commands in a file.  You would
  430. echo                  type SAVE followed by the filename, such as
  431. echo               CLEANUP.PGM, and the program file will be created
  432. echo                   automatically.  You could then use EPED to
  433. echo                     edit and embellish the program before
  434. echo                            RUNning it in ANALYSIS.
  435. echo
  436. ?Press <Enter> to continue (<F10> to QUIT): ?
  437. cls
  438. echo
  439. echo
  440. echo
  441. echo                       This completes the TUTOR2 tutorial.
  442. echo                              You have learned to:
  443. echo
  444. echo                       Run DOS commands from ANALYSIS
  445. echo                     BROWSE through or UPDATE data files
  446. echo                   Control the treatment of missing values
  447. echo               Use the SELECT, DEFINE, RECODE, and IF commands
  448. echo                    Manage dates and calculate intervals
  449. echo                          SET formatting options
  450. echo                         Save commands as programs
  451. ?Press <Enter> to continue (<F10> to QUIT): ?
  452. cls
  453. echo
  454. echo
  455. echo
  456. echo                   The way to learn more is to write programs
  457. echo                            to analyze your own data.
  458. echo                     Try to start with the simple operations
  459. echo                      first and work up to the more complex.
  460. echo
  461. echo                  Good luck.  We hope you enjoy using Epi Info.
  462. ?Press <Enter> to leave the tutorial: ?
  463.